<?php
	
namespace App\Http\Controllers;

use DB;
use Laravel\Lumen\Routing\Controller;
use Illuminate\Http\Request;

class ConsumerSellerController extends BaseController{

    public function index($id){
        $couponResult = DB::table('consumer_coupon')
                        ->join('coupon','consumer_coupon.coupon_id','=','coupon.id')
                        ->join('seller','coupon.seller_id','=','seller.id')
                        ->select('seller.id as seller_id',
                                 'seller.name as seller_name')
                        ->where('consumer_coupon.consumer_id',$id);
                        ->paginate(8)
                        ->toJson();
        $couponResult = json_decode($couponResult);
        return $this::jsonResponse(false,$couponResult);
}

?>